package h.c.z.designPattern.C01_FactoryPattern.NoDesign;

/**
 * [客户端]屌丝默默自己做，自己吃
 * @author jinsicao
 *
 */
public class EatWithNoDesign {

	public static void main(String[] args) {

		// 想吃红烧肉
		Product product = new RedMeatProduct();
		product.createProduct();
		// 想吃清蒸鱼
		product = new SteamedishProduct();
		product.createProduct();
		
	}

}

/**
 * 获取食物接口
 * @author jinsicao
 */
interface Product {
	
	/**
	 * 加工食物
	 * @return
	 */
	public void createProduct();
}

/**
 * 红烧肉
 * @author jinsicao
 *
 */
class RedMeatProduct implements Product {

	@Override
	public void createProduct() {
		System.out.println("吃红烧肉");
	}
	
}

/**
 * 清蒸鱼
 * @author jinsicao
 *
 */
class SteamedishProduct implements Product {
		
	@Override
	public void createProduct() {
		System.out.println("吃清蒸鱼");
	}
	
}
